package com.huaxin.dss2.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by likai on 2017/5/27.
 */
public class DateParseUtil {


    public static Date timeToDate(String time){
        SimpleDateFormat format =  new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String d = format.format(new Long(time));
        Date date= null;
        try {
            date = format.parse(d);
        } catch (ParseException e) {
            e.printStackTrace();
        }
      //  System.out.println("Format To String(Date):"+d);
     //   System.out.println("Format To Date:"+date);
        return date;
    }
}
